package com.lwx.web;

import com.lwx.entity.User;
import com.lwx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author draem
 * @create 2018-06-28 11:37
 */

@RestController
public class MybatisController {

    @Autowired
    private UserService userService;

    @RequestMapping(value = "/user",method = RequestMethod.POST)
   public  int addUser(@RequestBody User user)

    {
      int id =  userService.insert(user);
        return id;
    }
}
